// Playground - noun: a place where people can play

import Foundation

var str = "Hello, playground"

str.hasPrefix("Hello")

str.capitalizedString
str

str.uppercaseString
str

str.lowercaseString
str

//trim
var str2 = "        !!!!hi !       "
str2.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet())

str2.stringByTrimmingCharactersInSet(NSCharacterSet(charactersInString:" !"))

//split
var str3 = "welcome to play swift"
str3.componentsSeparatedByString(" ")

str3 = "welcome to play swift!Step-by-step learn from now"
str3.componentsSeparatedByCharactersInSet(NSCharacterSet(charactersInString: " -!"))

//join
var str4 = "-"
str4.join(["1","2","3"])
